package com.powernobug.servlet;

import com.powernobug.bean.vo.BaseRespVo;
import com.powernobug.bean.vo.PageVo;
import com.powernobug.bean.vo.param.AdminListParam;
import com.powernobug.bean.vo.param.LogListParam;
import com.powernobug.service.AdminLogService;
import com.powernobug.service.impl.AdminLogServiceImpl;
import com.powernobug.util.QueryParamPackageUtil;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;

/**
 * @Author: 肖云戈
 * @CreateTime: 2024-08-27
 * @Description:
 */
@WebServlet("/log/*")
public class AdminLogServlet extends CommonServlet{
    private static AdminLogService adminLogService = new AdminLogServiceImpl();

    public BaseRespVo list(HttpServletRequest req) {
        LogListParam logListParam = QueryParamPackageUtil.packParams(LogListParam.class, req);
        PageVo pageVo = adminLogService.getLogByPage(logListParam);
        return BaseRespVo.okList(pageVo);
    }
}
